<table class="table">
  <thead>
    <th class="first"><%= sort_link @search, :id, "#{t 'helpers.label.order.id'}" %></th>
    <th><%= sort_link @search, :number, "#{t 'helpers.label.order.number'}" %></th>
    <th><%= sort_link @search, :total, "#{t 'helpers.label.order.total'}" %></th>
    <th><%= sort_link @search, :user_name, "#{t 'helpers.label.order.user_name'}" %></th>
    <th><%= sort_link @search, :user_surname, "#{t 'helpers.label.order.user_surname'}" %></th>
    <th><%= sort_link @search, :user_email, "#{t 'helpers.label.order.user_email'}" %></th>
    <th><%= sort_link @search, :state, "#{t 'helpers.label.order.state'}" %></th>
    <th><%= sort_link @search, :completed_at, "#{t 'helpers.label.order.completed_at'}" %></th>
    <th class="last"></th>
  </thead>
  <tfoot>
    <th></th>
    <th colspan="2"><%= paginate orders %></th>
  </tfoot>
  <tbody>
    <% unless orders.blank? %>
      <%= render :partial => "order", :collection => orders %>
    <% else %>
      <tr>
        <th colspan="10">Nebyly nalezeny žádné objednávky.</th>
      </tr>
    <% end %>
  </tbody>
</table>